﻿<UserControl x:Class="Project.AllFunctionaries"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:CustomControls="clr-namespace:CustomControls;assembly=CustomControls"
             mc:Ignorable="d" 
              d:DesignHeight="550" d:DesignWidth="830" xmlns:my="clr-namespace:CustomControls;assembly=CustomControls">
    
    <Grid Name="Content">
        <Grid Height="36" Margin="11,11,56,0" Name="gridTitle"  VerticalAlignment="Top">
            <Border BorderBrush="#5C5C5C" BorderThickness="0,0,0,2">
                <TextBlock FontSize="24" FontWeight="Normal" Text="Ver Todos los Funcionarios" Width="711" HorizontalAlignment="Left" ></TextBlock>
            </Border>
        </Grid>
        <Grid Margin="0,35,0,0">
            <ListView Height="275" ItemContainerStyle="{DynamicResource ListViewEmployeeContainerStyle}" ItemsSource="{Binding}" Margin="46,212,47,0" Name="listViewEmployees" VerticalAlignment="Top">
                <ListView.View>
                    <GridView>
                        <GridViewColumn CellTemplate="{StaticResource CiEmployeeItemTemplate}" Header="C.I." Width="150" />
                        <GridViewColumn CellTemplate="{StaticResource NameEmployeeItemTemplate}" Header="Nombre" Width="270" />
                        <GridViewColumn CellTemplate="{StaticResource WorkingRoleItemTemplate}" Header="Cargo" Width="190" />
                        <GridViewColumn CellTemplate="{StaticResource RankEmployeeItemTemplate}" Header="Rango" Width="190" />
                    </GridView>
                </ListView.View>
                <ListView.ContextMenu>
                    <ContextMenu >
                        <MenuItem Header="Ver Funcionario" Click="View_Click"/>
                        <MenuItem Header="Modificar Funcionario" Click="Edit_Click"/>
                        <MenuItem Header="Cambiar Estado Funcionario" Click="Delete_Click"/>
                    </ContextMenu>
                </ListView.ContextMenu>
            </ListView>
            <GroupBox Header="Busqueda" Height="126" HorizontalAlignment="Left" Margin="92,68,0,0" Name="Busqueda" VerticalAlignment="Top" Width="652">
                <Grid>
                    <Label Content="Nombre:" Height="26" HorizontalAlignment="Left" Margin="10,44,0,0" Name="label1" VerticalAlignment="Top" />
                    <Label Content="C.I.:" Height="28" HorizontalAlignment="Left" Margin="445,48,0,0" Name="label3" VerticalAlignment="Top" />
                    <Label Content="Buscar por:" Height="28" HorizontalAlignment="Left" Margin="10,10,0,0" Name="label7" VerticalAlignment="Top" />
                    <RadioButton Content="Nombre" GroupName="ByWhat" Height="16" HorizontalAlignment="Left" IsChecked="True" Margin="75,10,0,0" Name="rbtnByName" VerticalAlignment="Top" PreviewMouseLeftButtonDown="rbtnByName_PreviewMouseLeftButtonDown" />
                    <RadioButton Content="C.I." GroupName="ByWhat" Height="16" HorizontalAlignment="Left" Margin="142,10,0,0" Name="rbtnByCi" VerticalAlignment="Top" PreviewMouseLeftButtonDown="rbtnByCi_PreviewMouseLeftButtonDown" />
                    <my:MaskTextBox DataType="RegEx" Height="23" HorizontalAlignment="Left" IsEnabled="True" Margin="85,44,0,0" MaxLength="60" Name="tbName" RegEx="^[A-Za-z'áéíóúÁÉÍÓÚÑñ\s]+$" VerticalAlignment="Top" Width="313" TextChanged="tbName_TextChanged" />
                    <my:MaskTextBox DataType="RegEx" Height="23" HorizontalAlignment="Left" IsEnabled="True" Margin="480,44,0,0" MaxLength="10" Name="tbCI" RegEx="^[0-9\s]+$" VerticalAlignment="Top" Width="145" TextChanged="tbCI_TextChanged" />
                </Grid>
            </GroupBox>
            <Label Content="Ver Funcionarios:" Height="28" HorizontalAlignment="Left" Margin="161,31,0,0" Name="label2" VerticalAlignment="Top" />
            <RadioButton Content="ACTIVOS" Height="16" HorizontalAlignment="Left" Margin="319,31,0,0" Name="Active" VerticalAlignment="Top" IsChecked="True" PreviewMouseLeftButtonDown="Active_PreviewMouseLeftButtonDown" />
            <RadioButton Content="EX-FUNCIONARIOS" Height="16" HorizontalAlignment="Left" Margin="440,31,0,0" Name="NonActives" VerticalAlignment="Top" PreviewMouseLeftButtonDown="NonActives_PreviewMouseLeftButtonDown" />
        </Grid>
    </Grid>
</UserControl>